// https://umijs.org/config/
import { defineConfig } from 'umi';
import defaultSettings from './defaultSettings';
import proxy from './proxy';
const { REACT_APP_ENV } = process.env; // const{ REACT_APP_ENV }=process.env ||{}

export default defineConfig({
  hash: true,
  antd: {},
  dva: {
    hmr: true,
  },
  locale: {
    // default zh-CN
    default: 'zh-CN',
    // default true, when it is true, will use `navigator.language` overwrite default
    antd: true,
    baseNavigator: true,
  },
  dynamicImport: {
    loading: '@/components/PageLoading/index',
  },
  targets: {
    ie: 11,
  },
  // umi routes: https://umijs.org/docs/routing
  routes: [
    {
      path: '/user',
      component: '../layouts/UserLayout',
      routes: [
        {
          name: 'login',
          path: '/user/login',
          component: './user/login',
        },
      ],
    },
    {
      path: '/',
      component: '../layouts/SecurityLayout',
      routes: [
        {
          path: '/',
          component: '../layouts/BasicLayout',
          // authority: ['admin', 'user'],
          routes: [
            {
              path: '/',
              redirect: '/welcome',
            },
            {
              path: '/welcome',
              name: 'welcome',
              icon: ' ',
              component: './Welcome',
            },
            {
              path: '/news',
              name: '公告消息',
              icon: 'smile',
              component: './ListTableList',
              routes: [
                {
                  path: '/news/newslist',
                  icon: '',
                  component: './ListTableList',
                },
              ],
            },
            {
              path: '/personal',
              name: '用户中心',
              icon: '',
              routes: [
                {
                  path: '/personal',
                  name: '个人资料',
                  icon: '',
                  component: './personalCenter',
                },
              ],
            }, // {
            //   path:'/help',
            //   name:'帮助中心',
            //   icon:'',
            //   component:'',
            //   routes:[
            //     {
            //       path: '/help/Onlineservice',
            //       name:"在线客服",
            //       icon:'',
            //       component:'./ ',
            //     },
            //     {
            //       path: '/help/serviceCenter ',
            //       name:"服务中心",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/help/feedback',
            //       name:"意见反馈",
            //       icon:'',
            //       component:'',
            //     },
            //     // {
            //     //   path: '/help/phone',
            //     //   name:"联系电话",
            //     //   icon:'',
            //     //   component:'',
            //     // },
            //   ]
            // },
            {
              path: '/basic',
              name: '基础信息',
              icon: '',
              routes: [
                {
                  path: '/basic/college',
                  name: '院(系)专业信息',
                  icon: '',
                  component: './Basic/College',
                },
                {
                  path: '/basic/classAndGrade',
                  name: '班级信息',
                  icon: '',
                  component: './basic/classAndGrade',
                },
                {
                  path: '/basic/teacher',
                  name: '教师信息',
                  icon: '',
                  component: './Basic/Teacher',
                },
                {
                  path:'/basic/create_teacher',
                  name:'新增教师',
                  icon:'',
                  component:'./Basic/Teacher'
                },
                {
                  path: '/basic/student',
                  name: '学生信息',
                  icon: '',
                  component: './Basic/Student',
                },
                {
                  path: '/basic/practicetype',
                  name: '实践类型',
                  icon: '',
                  component: './Basic/Practicetype',
                },
                {
                  path: '/basic/practicalCurriculum',
                  name: '实践课程',
                  icon: '',
                  component: './Basic/PracticalCurriculum',
                },
              ],
            },
            {
              path: '/practice',
              name: '实践教学',
              icon: '',
              routes: [
                // {
                //   path: '/practice/workbench',
                //   name: '工作台',
                //   icon: '',
                //   component: './Practice/Workbench',
                // },
                {
                  path: '/practice/jobPlacement',
                  name: '工作安排',
                  icon: '', 
                  component: './practice/jobPlacement/ListTable',
                },
                {
                  path: '/practice/internshipProjectAudit', 
                  name: '实习项目审核',
                  icon: '',
                  component: './Practice/InternshipProjectAudit',
                },
                // {
                //   path: '/practice/templateLibrary',
                //   name: '模板库',
                //   icon: '',
                //   component: './Practice/TemplateLibrary',
                // },
                {
                  path: '/practice/SignUpToReview',
                  name: '报名审核',
                  icon: '',
                  component: './Practice/SignUpToReview',
                },
                {
                  path: '/practice/OnSundayHe',
                  name: '周日志批阅',
                  icon: '',
                  component: './Practice/OnSundayHe',
                },
                {
                  path: '/practice/InternshipEvaluation',
                  name: '实习评价',
                  icon: '',
                  component: './Practice/InternshipEvaluation',
                },
                {
                  path: '/practice/ReportToTReview',
                  name: '报告批阅',
                  icon: '',
                  component: './Practice/ReportToTReview',
                },
                {
                  path: '/practice/AchievementAppraisal',
                  name: '实习成绩鉴定',
                  icon: '',
                  component: './Practice/AchievementAppraisal',
                },
                {
                  path: '/practice/MyTrainee',
                  name: '我的实习生',
                  icon: '',
                  component: './Practice/MyTrainee',
                },
                {
                  path: '/practice/SignInStatistics',
                  name: '签到统计',
                  icon: '',
                  component: './Practice/SignInStatistics',
                },
                {
                  path: '/practice/InternshipExamine',
                  name: '实习检查',
                  icon: '',
                  component: './Practice/InternshipExamine',
                },
                // {
                //   path: '/practice/questionnaireSurvey',
                //   name: '问卷调查',
                //   icon: '',
                //   component: './Practice/QuestionnaireSurvey',
                // }, 
              ],
            },
            {
              path: '/internshipPosition',
              name: '基地/实习点',
              icon: '',
              routes: [
                {
                  path: '/InternshipPosition/practiceBase',
                  name: '实践基地',
                  icon: '',
                  component: './InternshipPosition/PracticeBase',
                },
                {
                  path: '/InternshipPosition/practiceUnit',
                  name: '实习单位',
                  icon: '',
                  component: './InternshipPosition/PracticeUnit',
                },
                {
                  path: '/InternshipPosition/cooperationUnit',
                  name: '基地合作单位',
                  icon: '',
                  component: './InternshipPosition/CooperationUnit',
                },
              ],
            }, // {
            //   path:'/download ',
            //   name:'下载中心',
            //   icon:'',
            //   component:'./',
            //   routes:[
            //     {
            //       path: '/download',
            //       name:"下载中心",
            //       icon:'',
            //       component:'./',
            //     }
            //   ]
            // },
            // {
            //   path:'/statisticalForm ',
            //   name:'统计报表',
            //   icon:'',
            //   component:'./',
            //   routes:[
            //     {
            //       path: '/statisticalForm/practiceCondition',
            //       name:"实践教学情况",
            //       icon:'',
            //       component:'./',
            //     },
            //     {
            //       path: '/statisticalForm/TraineeParticipation',
            //       name:"实习生参与情况",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/DetailsOfTeacherGuidance',
            //       name:"教师指导明细",
            //       icon:'',
            //       component:'./',
            //     },
            //     {
            //       path: '/statisticalForm/StudentActivation',
            //       name:"学生激活情况",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/StudentParticipationDetails',
            //       name:"学生参与明细",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/DetailsOfInternshipProcess',
            //       name:"实习过程明细",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/SignInStatisticsDetails',
            //       name:"签到统计明细",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/SundayScoreStatistics',
            //       name:"周日志成绩统计",
            //       icon:'',
            //       component:'',
            //     },
            //     {
            //       path: '/statisticalForm/InternshipReportStatistics',
            //       name:"实习报告统计",
            //       icon:'',
            //       component:'',
            //     },
            //   ]
            // },
            // {
            //   path:'/myFavorite ',
            //   name:'我的收藏',
            //   icon:'',
            //   component:'./',
            //   routes:[
            //     {
            //       path: '/myFavorite',
            //       name:"我的收藏",
            //       icon:'',
            //       component:'./',
            //     }
            //   ]
            // },
            {
              component: './404',
            },
          ],
        },
        {
          component: './404',
        },
      ],
    },
    {
      component: './404',
    },
  ],
  // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  theme: {
    // ...darkTheme,
    'primary-color': defaultSettings.primaryColor,
  },
  // @ts-ignore
  title: false,
  ignoreMomentLocale: true,
  proxy: proxy[REACT_APP_ENV || 'dev'],
  manifest: {
    basePath: '/',
  },
});
